<div class="orgInfo">
    <div class="view">
        <div ng-hide="type == 'view' || applyInfo.id">
            <h2 ng-hide="type == 'view'">挂靠审核<span class="record-count">(共<span ng-bind="orgVerifyListCount"></span>条申请)</span></h2>
            <tabset justified="true" ng-hide="type == 'view'" style="margin-bottom: 20px;">
                <tab heading="待审核" select="changeStatus(0)" active="verifyTabs[0]">

                </tab>
                <tab heading="已通过" select="changeStatus(2)" active="verifyTabs[2]">

                </tab>
                <tab heading="未通过" select="changeStatus(-1)" active="verifyTabs[-1]">

                </tab>
            </tabset>
            <div dx-data-grid="orgVerifyListGridConfig" ng-hide="type == 'view'">
                <div data-options="dxTemplate: { name: 'createTimeCellTemplate' }">
                    <span  ng-bind="data.createTime | date:'yyyy-MM-dd HH:mm:ss'"></span>
                </div>
                <div data-options="dxTemplate: { name: 'verifyTimeCellTemplate' }">
                    <span  ng-bind="data.verifyTime | date:'yyyy-MM-dd HH:mm:ss'"></span>
                </div>
                <div data-options="dxTemplate: { name: 'statusCellTemplate' }">
                    <span  class="verifyStatus{{data.status}}">{{$parent.statusEnum[data.status]}}</span>
                </div>
                <div data-options="dxTemplate: { name: 'operationCellTemplate' }">
                    <div class="operation">
                        <a ng-click="$parent.showGroupInfo(data)"><i></i>基地详情</a>
                        <a ng-click="$parent.Verify(data)"><i></i>审核{{data.status != 0 ? '历史':''}}</a>
                    </div>
                </div>
            </div>
        </div>
        <div ng-show="applyInfo.id">
            <h2>{{orgVerifyHistoryGridConfig.dataSource[0].groupName}}挂靠申请</h2>
            <form class="form-horizontal" ng-submit="check()">
                <div class="form-inline col-sm-12">
                    <div class="col-xs-6 form-group">
                        <label for="status" class="text-right">
                    <span class="required-color">
                        *
                    </span>
                            申请状态
                        </label>
                        <select ng-model="applyInfo.status" class="form-control" id="status" required tabindex="1">
                            <!--<option value="0">待审核</option>-->
                            <option value="2">通过</option>
                            <option value="-1">拒绝</option>
                        </select>
                    </div>
                </div>
                <div class="form-inline col-sm-12">
                    <div class="col-xs-6 form-group">
                        <label for="remark" class="text-right">
                    <span class="required-color">
                        *
                    </span>
                            备注信息
                        </label>
                        <input type="text" ng-model="applyInfo.remark" ng-disabled="applyInfo.status == 0" class="form-control" id="remark" required tabindex="2"/>
                    </div>
                </div>
                <div class="form-inline col-xs-12 form-footer" style="margin-bottom: 20px;">
                    <div class="col-sm-12">
                        <input type="submit" value="提交" class="col-sm-offset-3 col-sm-2 btn btn-primary" ng-disabled="applyInfo.status == 0 || $parent.userInfo.role != 2"/>
                    </div>
                </div>
            </form>
        </div>
        <div ng-show="type == 'view'">
            <h2  style="clear: both;">{{orgVerifyHistoryGridConfig.dataSource[0].groupName}}审核历史</h2>
            <div dx-data-grid="orgVerifyHistoryGridConfig" ng-show="type == 'view'">
                <div data-options="dxTemplate: { name: 'createTimeCellTemplate' }">
                    <span  ng-bind="data.createTime | date:'yyyy-MM-dd HH:mm:ss'"></span>
                </div>
                <div data-options="dxTemplate: { name: 'operationCellTemplate' }">
                    <div class="operation">
                        <div ng-if="data.status != 0">{{$parent.$parent.statusEnum[data.status]}}:{{data.remark}}</div>
                    </div>
                </div>
            </div>
            <input type="submit" value="返回" class="col-sm-offset-3 col-sm-2 btn btn-primary" ng-click="applyInfo = {};type = 'list'" style="margin-top: 20px;"/>
        </div>
    </div>
</div>
